<?= link_to "Devmode top", devmode_path ?>
<h1><%= t('.links_to_view', :default => "Links to view ") %><%=h @viewname %></h1>
<% if @errors %>
  <div class="error" style="color: red">
    <%= @errors %>
  </div>
<% else %>
<div>
  <h3>Linked to from:</h3>
  <ul>
    <% for view in @links %>
      <li>
        <% name = "#{view[0]}/#{view[1]}" %>
        <%=link_to h(name),
          :controller => 'devmode',
          :action => 'backtrace_view',
          :viewname => name
        %>
        <% if !view[1].start_with? '_' %>
          (<%= link_to "Also as a view...",
          :controller => 'devmode',
          :action => 'inspect_view',
          :view_name => view[1],
          :controller_name => view[0]
          %>)
        <% end %>
      </li>
    <% end unless @links.nil? %>
  </ul>
</div>
<% end %>
